package cn.funeralobjects.aoss.entity;

import cn.funeralobjects.aoss.converter.StorageClassConverter;
import cn.funeralobjects.aoss.enums.StorageClass;
import cn.funeralobjects.common.jpa.entity.BaseCloudJpaEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Entity of Bucket
 *
 * @author FuneralObjects
 * Create date: 2020/6/1 9:40 AM
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "t_bucket")
@Data
@DynamicInsert
@DynamicUpdate
@Accessors(chain = true)
public class EBucket extends BaseCloudJpaEntity<Integer> {
    /**
     * 所属资源编码
     */
    private String prodResCode;

    /**
     * 存储类型
     */
    @Convert(converter = StorageClassConverter.class)
    private StorageClass storageClass;
    /**
     * 所在域
     */
    private String location;
    /**
     * 外网访问域
     */
    private String extranetEndpoint;
    /**
     * 内网访问域
     */
    private String intranetEndpoint;
    /**
     * 资源包创建日期
     */
    private Date createDate;
}
